<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    .container{
        display: flex;
        
    }
    .left{
        margin-right: 10px;
        margin-left: 10px;
        /* float:left; */
    }
    /* .right{
        float:right;
    } */
    button{
        background: #fff;
        outline: 0;
        border: 1px solid #ccc;
        border-radius: 5px;
    }
</style>
<body>
    <div class="container">
        <div class="left">
            <div style="display:block;" name="left"><img src="number/0.bmp"></div>
            <div style="display:none;" name="left"><img src="number/1.bmp"></div>
            <div style="display:none;" name="left"><img src="number/2.bmp"></div>
            <div style="display:none;" name="left"><img src="number/3.bmp"></div>
            <div style="display:none;" name="left"><img src="number/4.bmp"></div>
            <div style="display:none;" name="left"><img src="number/5.bmp"></div>
            <div style="display:none;" name="left"><img src="number/6.bmp"></div>
            <div style="display:none;" name="left"><img src="number/7.bmp"></div>
            <div style="display:none;" name="left"><img src="number/8.bmp"></div>
            <div style="display:none;" name="left"><img src="number/9.bmp"></div>
        </div>
        <div class="right">
            <div style="display:block;" name="right"><img src="number/0.bmp"></div>
            <div style="display:none;" name="right"><img src="number/1.bmp"></div>
            <div style="display:none;" name="right"><img src="number/2.bmp"></div>
            <div style="display:none;" name="right"><img src="number/3.bmp"></div>
            <div style="display:none;" name="right"><img src="number/4.bmp"></div>
            <div style="display:none;" name="right"><img src="number/5.bmp"></div>
            <div style="display:none;" name="right"><img src="number/6.bmp"></div>
            <div style="display:none;" name="right"><img src="number/7.bmp"></div>
            <div style="display:none;" name="right"><img src="number/8.bmp"></div>
            <div style="display:none;" name="right"><img src="number/9.bmp"></div>
        </div>
    </div>
    <button id="start" onclick="start()">开始</button>
    <button id="stop" onclick="stop()" disabled>停止</button>
    <button id="reset" onclick="reset()" disabled>复位</button>
</body>
<script>
    var timer;
    var i=0;
    function start(){
        timer = setInterval("auto_tab_div()",1000);
        document.getElementById("stop").disabled = false;
        document.getElementById("reset").disabled = false;
    }
    function stop(){
        clearInterval(timer);
    }
    function reset(){
        clearInterval(timer);
        i=0;
        div_tab_left(i);
        div_tab_right(i);
    }
    function div_tab_right(tagName){
        var rightArr = document.getElementsByName("right");
        for(var i=0;i<10;i++){
            if(i==tagName){
                rightArr[i].style = "display:block";
            }else{
                rightArr[i].style = "display:none";
            } 
        }
    }
    function div_tab_left(tagName){
        var leftArr = document.getElementsByName("left");
        for(var i=0;i<10;i++){
            if(i==tagName){
               leftArr[i].style = "display:block";
            }else{
                leftArr[i].style = "display:none";
            } 
        }
    }
    function auto_tab_div(){ 
        div_tab_right(i%10);
        var j = parseInt(i/10);
        div_tab_left(j);
        i++;
        if(i==99){
            i=0;
        }
    }
</script>
</html>